package cn.ekgc.common.handle;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import java.sql.SQLException;

/**
 * 异常处理
 */

@ControllerAdvice
@Slf4j
public class ExceptionHandlerDemo {

    @ExceptionHandler(SQLException.class)
    public void sqlExceptionHandler(SQLException e){
        log.info(e.getMessage(),e);

    }
}
